#pragma once
#include <spdlog/spdlog.h>
#include <vsg/all.h>
#include <entt/entt.hpp>
#include "qbe/src/ecs/app.hpp"
#include "qlib/all.h"
#include "shader.h"

#include "qbe/src/ecs/query.hpp"

namespace qbe::utils::TempRender {
class RenderPin {
 public:
  RenderPin(vsg::ref_ptr<vsg::Options> options, std::vector<qlib::Pin::s_ptr> pins);
  ~RenderPin();

  void updateData(std::vector<qlib::Pin::s_ptr> pins);
  void setShowHide(bool is_show);
  vsg::dmat4 m;

  vsg::ref_ptr<vsg::Switch> switchObject;
 private:
  std::vector<qlib::Pin::s_ptr> m_pins; 
  vsg::ref_ptr<vsg::MatrixTransform> transform;
  vsg::ref_ptr<LineMeshNode> line_node;
  vsg::ref_ptr<PointMeshNode> point_node;
};

}  // namespace qbe::utils::TempRender